package com.smart.common.vo;

import lombok.Getter;

@Getter
public enum ResponseEnumCode {
    /**
     *
     */
    SUCCESS(200, "success", "成功"),
    /**
     *
     */
    ERROR(400, "error", "系统繁忙!!!"),
    /**
     *
     */
    SYS_ERROR(40010, "error", "系统错误!!! 请稍后再试!!!"),

    //  ====== 用户相关========
    /**
     * 验证码过期
     */
    MEMBER_VERIFICATION_EXPIRE(40040, "verification  code  expire", "验证码已过期"),
    /**
     * 1
     */
    MEMBER_VERIFICATION_ERROR(40041, "verification  code  error", "验证码错误"),
    /**
     * 1
     */
    MEMBER_LOGIN_ERROR(40042, "login  fail", "登录失败"),


    /**
     * 手机号已被注册
     */
    REGISTER_PHONE_EXIST(40043, "phone is exist", "该手机号已被注册!"),
    /**
     * 邮箱被注册
     */
    REGISTER_EMAIL_EXIST(40044, "email is exist", "该邮箱已被注册!"),
    // ========= 幂等性相关的错误信息=========
    /**
     * 删除token失败
     */
    IDEMPOTENT_TOKEN_DELETE_ERROR(400010, "token is delete error", "token删除失败"),
    /**
     * 错误的token
     */
    IDEMPOTENT_TOKEN_ERROR(400011, "token is error", "token 错误"),
    /**
     * token不能为空
     */
    IDEMPOTENT_NOT_NULL_ERROR(400011, "token is null", "token 不能为空"),
    /**
     * 商品下架
     */
    ORDER_PRODUCT_OUT(40001, "order product out", "该商品已经下架"),
    /**
     * 支付相关
     */
    PAY_FAIL_ERROR(40100, "ali pay fail", "支付宝支付失败!!!");
    /**
     * 错误信息
     */
    private final String msg;
    /**
     * 状态码
     */
    private final Integer status;
    /**
     * 提示信息
     */
    private final String tip;

    ResponseEnumCode(Integer status, String msg, String tip) {
        this.msg = msg;
        this.status = status;
        this.tip = tip;
    }

}
